package org.gc.service.security;

import java.util.Set;

import org.gc.common.entity.security.RoleGroup;
import org.gc.common.vo.security.RoleGroupVO;
import org.gc.common.vo.security.RoleVO;
import org.gc.common.vo.security.UserVO;
import org.gc.service.base.BaseService;


public interface RoleGroupService  extends BaseService<RoleGroup, RoleGroupVO, Long> {

	/**
	 * 根据一组roleGroupId,获取所有Role
	 */
	public Set<RoleGroupVO> getAll(Set<Long> roleGroupIds);

	/**
	 * 根据一组roleGroupId,获取所有RoleGroup
	 */
	public Set<RoleVO> getAllRoles(Set<Long> roleGroupIds);
	
	/**
	 * 授予某个用户一组RoleGroup权限
	 * @param user 被授权的用户
	 * @param roleGroupIds
	 */
	public void authorize(UserVO user,Set<Long> roleGroupIds);
	
	/**
	 * 修改某一个roleGroup
	 * @param roleGroup
	 * @param roles 该roleGroup拥有的所有Role
	 */
	public void update(RoleGroupVO roleGroup,Set<String> roles);
}
